﻿using OpenMir2.Common;
using SystemModule;

namespace CommandModule.Conf
{
    public class GameCmdConf : ConfigFile
    {
        public GameCmdConf(string fileName) : base(fileName)
        {
            Load();
        }

        /// <summary>
        /// 读取自定义命令配置
        /// </summary>
        public void LoadConfig(GameCommands commands)
        {
            commands.Data.CmdName = ReadWriteString("Command", "Date", commands.Data.CmdName);
            commands.Data.PerMissionMin = ReadWriteByte("Permission", "Date", commands.Data.PerMissionMin);
            commands.PrvMsg.CmdName = ReadWriteString("Command", "PrvMsg", commands.PrvMsg.CmdName);
            commands.PrvMsg.PerMissionMin = ReadWriteByte("Permission", "PrvMsg", commands.PrvMsg.PerMissionMin);
            commands.AllowMsg.CmdName = ReadWriteString("Command", "AllowMsg", commands.AllowMsg.CmdName);
            commands.AllowMsg.PerMissionMin = ReadWriteByte("Permission", "AllowMsg", commands.AllowMsg.PerMissionMin);
            commands.Letshout.CmdName = ReadWriteString("Command", "LetShout", commands.Letshout.CmdName);
            commands.LetTrade.CmdName = ReadWriteString("Command", "LetTrade", commands.LetTrade.CmdName);
            commands.LetGuild.CmdName = ReadWriteString("Command", "LetGuild", commands.LetGuild.CmdName);
            commands.EndGuild.CmdName = ReadWriteString("Command", "EndGuild", commands.EndGuild.CmdName);
            commands.BanGuildChat.CmdName = ReadWriteString("Command", "BanGuildChat", commands.BanGuildChat.CmdName);
            commands.Authally.CmdName = ReadWriteString("Command", "AuthAlly", commands.Authally.CmdName);
            commands.Auth.CmdName = ReadWriteString("Command", "Auth", commands.Auth.CmdName);
            commands.AuthCancel.CmdName = ReadWriteString("Command", "AuthCancel", commands.AuthCancel.CmdName);
            commands.Diary.CmdName = ReadWriteString("Command", "ViewDiary", commands.Diary.CmdName);
            commands.UserMove.CmdName = ReadWriteString("Command", "UserMove", commands.UserMove.CmdName);
            commands.Searching.CmdName = ReadWriteString("Command", "Searching", commands.Searching.CmdName);
            commands.AllowGroupCall.CmdName = ReadWriteString("Command", "AllowGroupCall", commands.AllowGroupCall.CmdName);
            commands.GroupRecalll.CmdName = ReadWriteString("Command", "GroupCall", commands.GroupRecalll.CmdName);
            commands.AllowGuildRecall.CmdName = ReadWriteString("Command", "AllowGuildReCall", commands.AllowGuildRecall.CmdName);
            commands.GuildRecalll.CmdName = ReadWriteString("Command", "GuildReCall", commands.GuildRecalll.CmdName);
            commands.UnlockStorage.CmdName = ReadWriteString("Command", "StorageUnLock", commands.UnlockStorage.CmdName);
            commands.Unlock.CmdName = ReadWriteString("Command", "PasswordUnLock", commands.Unlock.CmdName);
            commands.Lock.CmdName = ReadWriteString("Command", "StorageLock", commands.Lock.CmdName);
            commands.SetPassword.CmdName = ReadWriteString("Command", "StorageSetPassword", commands.SetPassword.CmdName);
            commands.PasswordLock.CmdName = ReadWriteString("Command", "PasswordLock", commands.PasswordLock.CmdName);
            commands.ChgPassword.CmdName = ReadWriteString("Command", "StorageChgPassword", commands.ChgPassword.CmdName);
            commands.ClrPassword.CmdName = ReadWriteString("Command", "StorageClearPassword", commands.ClrPassword.CmdName);
            commands.ClrPassword.PerMissionMin = ReadWriteByte("Permission", "StorageClearPassword", commands.ClrPassword.PerMissionMin);
            commands.UnPassword.CmdName = ReadWriteString("Command", "StorageUserClearPassword", commands.UnPassword.CmdName);
            commands.MemberFunction.CmdName = ReadWriteString("Command", "MemberFunc", commands.MemberFunction.CmdName);
            commands.MemberFunctioneX.CmdName = ReadWriteString("Command", "MemberFuncEx", commands.MemberFunctioneX.CmdName);
            commands.Dear.CmdName = ReadWriteString("Command", "Dear", commands.Dear.CmdName);
            commands.Master.CmdName = ReadWriteString("Command", "Master", commands.Master.CmdName);
            commands.DearRecall.CmdName = ReadWriteString("Command", "DearRecall", commands.DearRecall.CmdName);
            commands.MasteRecall.CmdName = ReadWriteString("Command", "MasterRecall", commands.MasteRecall.CmdName);
            commands.AllowDearRcall.CmdName = ReadWriteString("Command", "AllowDearRecall", commands.AllowDearRcall.CmdName);
            commands.AllowMasterRecall.CmdName = ReadWriteString("Command", "AllowMasterRecall", commands.AllowMasterRecall.CmdName);
            commands.AttackMode.CmdName = ReadWriteString("Command", "AttackMode", commands.AttackMode.CmdName);
            commands.Rest.CmdName = ReadWriteString("Command", "Rest", commands.Rest.CmdName);
            commands.TakeonHorse.CmdName = ReadWriteString("Command", "TakeOnHorse", commands.TakeonHorse.CmdName);
            commands.TakeofHorse.CmdName = ReadWriteString("Command", "TakeOffHorse", commands.TakeofHorse.CmdName);
            commands.HumanLocal.CmdName = ReadWriteString("Command", "HumanLocal", commands.HumanLocal.CmdName);
            commands.HumanLocal.PerMissionMin = ReadWriteByte("Permission", "HumanLocal", commands.HumanLocal.PerMissionMin);
            commands.Move.CmdName = ReadWriteString("Command", "Move", commands.Move.CmdName);
            commands.Move.PerMissionMin = ReadWriteByte("Permission", "MoveMin", commands.Move.PerMissionMin);
            commands.Move.PerMissionMax = ReadWriteByte("Permission", "MoveMax", commands.Move.PerMissionMax);
            commands.PositionMove.CmdName = ReadWriteString("Command", "PositionMove", commands.PositionMove.CmdName);
            commands.PositionMove.PerMissionMin = ReadWriteByte("Permission", "PositionMoveMin", commands.PositionMove.PerMissionMin);
            commands.PositionMove.PerMissionMax = ReadWriteByte("Permission", "PositionMoveMax", commands.PositionMove.PerMissionMax);
            commands.Info.CmdName = ReadWriteString("Command", "Info", commands.Info.CmdName);
            commands.Info.PerMissionMin = ReadWriteByte("Permission", "Info", commands.Info.PerMissionMin);
            commands.MobLevel.CmdName = ReadWriteString("Command", "MobLevel", commands.MobLevel.CmdName);
            commands.MobLevel.PerMissionMin = ReadWriteByte("Permission", "MobLevel", commands.MobLevel.PerMissionMin);
            commands.MobCount.CmdName = ReadWriteString("Command", "MobCount", commands.MobCount.CmdName);
            commands.MobCount.PerMissionMin = ReadWriteByte("Permission", "MobCount", commands.MobCount.PerMissionMin);
            commands.HumanCount.CmdName = ReadWriteString("Command", "HumanCount", commands.HumanCount.CmdName);
            commands.HumanCount.PerMissionMin = ReadWriteByte("Permission", "HumanCount", commands.HumanCount.PerMissionMin);
            commands.Map.CmdName = ReadWriteString("Command", "Map", commands.Map.CmdName);
            commands.Map.PerMissionMin = ReadWriteByte("Permission", "Map", commands.Map.PerMissionMin);
            commands.Kick.CmdName = ReadWriteString("Command", "Kick", commands.Kick.CmdName);
            commands.Kick.PerMissionMin = ReadWriteByte("Permission", "Kick", commands.Kick.PerMissionMin);
            commands.Ting.CmdName = ReadWriteString("Command", "Ting", commands.Ting.CmdName);
            commands.Ting.PerMissionMin = ReadWriteByte("Permission", "Ting", commands.Ting.PerMissionMin);
            commands.Superting.CmdName = ReadWriteString("Command", "SuperTing", commands.Superting.CmdName);
            commands.Superting.PerMissionMin = ReadWriteByte("Permission", "SuperTing", commands.Superting.PerMissionMin);
            commands.MapMove.CmdName = ReadWriteString("Command", "MapMove", commands.MapMove.CmdName);
            commands.MapMove.PerMissionMin = ReadWriteByte("Permission", "MapMove", commands.MapMove.PerMissionMin);
            commands.ShutUp.CmdName = ReadWriteString("Command", "Shutup", commands.ShutUp.CmdName);
            commands.ShutUp.PerMissionMin = ReadWriteByte("Permission", "Shutup", commands.ShutUp.PerMissionMin);
            commands.ReleaseShutup.CmdName = ReadWriteString("Command", "ReleaseShutup", commands.ReleaseShutup.CmdName);
            commands.ReleaseShutup.PerMissionMin = ReadWriteByte("Permission", "ReleaseShutup", commands.ReleaseShutup.PerMissionMin);
            commands.ShutupList.CmdName = ReadWriteString("Command", "ShutupList", commands.ShutupList.CmdName);
            commands.ShutupList.PerMissionMin = ReadWriteByte("Permission", "ShutupList", commands.ShutupList.PerMissionMin);
            commands.GameMaster.CmdName = ReadWriteString("Command", "GameMaster", commands.GameMaster.CmdName);
            commands.GameMaster.PerMissionMin = ReadWriteByte("Permission", "GameMaster", commands.GameMaster.PerMissionMin);
            commands.ObServer.CmdName = ReadWriteString("Command", "ObServer", commands.ObServer.CmdName);
            commands.ObServer.PerMissionMin = ReadWriteByte("Permission", "ObServer", commands.ObServer.PerMissionMin);
            commands.SueprMan.CmdName = ReadWriteString("Command", "SuperMan", commands.SueprMan.CmdName);
            commands.SueprMan.PerMissionMin = ReadWriteByte("Permission", "SuperMan", commands.SueprMan.PerMissionMin);
            commands.Level.CmdName = ReadWriteString("Command", "Level", commands.Level.CmdName);
            commands.Level.PerMissionMin = ReadWriteByte("Permission", "Level", commands.Level.PerMissionMin);
            commands.SabukWallGold.CmdName = ReadWriteString("Command", "SabukWallGold", commands.SabukWallGold.CmdName);
            commands.SabukWallGold.PerMissionMin = ReadWriteByte("Permission", "SabukWallGold", commands.SabukWallGold.PerMissionMin);
            commands.Recall.CmdName = ReadWriteString("Command", "Recall", commands.Recall.CmdName);
            commands.Recall.PerMissionMin = ReadWriteByte("Permission", "Recall", commands.Recall.PerMissionMin);
            commands.Regoto.CmdName = ReadWriteString("Command", "ReGoto", commands.Regoto.CmdName);
            commands.Regoto.PerMissionMin = ReadWriteByte("Permission", "ReGoto", commands.Regoto.PerMissionMin);
            commands.ShowFlag.CmdName = ReadWriteString("Command", "Flag", commands.ShowFlag.CmdName);
            commands.ShowFlag.PerMissionMin = ReadWriteByte("Permission", "Flag", commands.ShowFlag.PerMissionMin);
            commands.ShowOpen.CmdName = ReadWriteString("Command", "ShowOpen", commands.ShowOpen.CmdName);
            commands.ShowOpen.PerMissionMin = ReadWriteByte("Permission", "ShowOpen", commands.ShowOpen.PerMissionMin);
            commands.ShowUnit.CmdName = ReadWriteString("Command", "ShowUnit", commands.ShowUnit.CmdName);
            commands.ShowUnit.PerMissionMin = ReadWriteByte("Permission", "ShowUnit", commands.ShowUnit.PerMissionMin);
            commands.Attack.CmdName = ReadWriteString("Command", "Attack", commands.Attack.CmdName);
            commands.Attack.PerMissionMin = ReadWriteByte("Permission", "Attack", commands.Attack.PerMissionMin);
            commands.Mob.CmdName = ReadWriteString("Command", "Mob", commands.Mob.CmdName);
            commands.Mob.PerMissionMin = ReadWriteByte("Permission", "Mob", commands.Mob.PerMissionMin);
            commands.MobNpc.CmdName = ReadWriteString("Command", "MobNpc", commands.MobNpc.CmdName);
            commands.MobNpc.PerMissionMin = ReadWriteByte("Permission", "MobNpc", commands.MobNpc.PerMissionMin);
            commands.DeleteNpc.CmdName = ReadWriteString("Command", "DelNpc", commands.DeleteNpc.CmdName);
            commands.DeleteNpc.PerMissionMin = ReadWriteByte("Permission", "DelNpc", commands.DeleteNpc.PerMissionMin);
            commands.NpcScript.CmdName = ReadWriteString("Command", "NpcScript", commands.NpcScript.CmdName);
            commands.NpcScript.PerMissionMin = ReadWriteByte("Permission", "NpcScript", commands.NpcScript.PerMissionMin);
            commands.RecallMob.CmdName = ReadWriteString("Command", "RecallMob", commands.RecallMob.CmdName);
            commands.RecallMob.PerMissionMin = ReadWriteByte("Permission", "RecallMob", commands.RecallMob.PerMissionMin);
            commands.LuckyPoint.CmdName = ReadWriteString("Command", "LuckPoint", commands.LuckyPoint.CmdName);
            commands.LuckyPoint.PerMissionMin = ReadWriteByte("Permission", "LuckPoint", commands.LuckyPoint.PerMissionMin);
            commands.LotteryTicket.CmdName = ReadWriteString("Command", "LotteryTicket", commands.LotteryTicket.CmdName);
            commands.LotteryTicket.PerMissionMin = ReadWriteByte("Permission", "LotteryTicket", commands.LotteryTicket.PerMissionMin);
            commands.ReloadGuild.CmdName = ReadWriteString("Command", "ReloadGuild", commands.ReloadGuild.CmdName);
            commands.ReloadGuild.PerMissionMin = ReadWriteByte("Permission", "ReloadGuild", commands.ReloadGuild.PerMissionMin);
            commands.ReloadLineNotice.CmdName = ReadWriteString("Command", "ReloadLineNotice", commands.ReloadLineNotice.CmdName);
            commands.ReloadLineNotice.PerMissionMin = ReadWriteByte("Permission", "ReloadLineNotice", commands.ReloadLineNotice.PerMissionMin);
            commands.ReloadAbuse.CmdName = ReadWriteString("Command", "ReloadAbuse", commands.ReloadAbuse.CmdName);
            commands.ReloadAbuse.PerMissionMin = ReadWriteByte("Permission", "ReloadAbuse", commands.ReloadAbuse.PerMissionMin);
            commands.BackStep.CmdName = ReadWriteString("Command", "BackStep", commands.BackStep.CmdName);
            commands.BackStep.PerMissionMin = ReadWriteByte("Permission", "BackStep", commands.BackStep.PerMissionMin);
            commands.Ball.CmdName = ReadWriteString("Command", "Ball", commands.Ball.CmdName);
            commands.Ball.PerMissionMin = ReadWriteByte("Permission", "Ball", commands.Ball.PerMissionMin);
            commands.FreePenalty.CmdName = ReadWriteString("Command", "FreePenalty", commands.FreePenalty.CmdName);
            commands.FreePenalty.PerMissionMin = ReadWriteByte("Permission", "FreePenalty", commands.FreePenalty.PerMissionMin);
            commands.PkPoint.CmdName = ReadWriteString("Command", "PkPoint", commands.PkPoint.CmdName);
            commands.PkPoint.PerMissionMin = ReadWriteByte("Permission", "PkPoint", commands.PkPoint.PerMissionMin);
            commands.IncpkPoint.CmdName = ReadWriteString("Command", "IncPkPoint", commands.IncpkPoint.CmdName);
            commands.IncpkPoint.PerMissionMin = ReadWriteByte("Permission", "IncPkPoint", commands.IncpkPoint.PerMissionMin);
            commands.ChangeLuck.CmdName = ReadWriteString("Command", "ChangeLuck", commands.ChangeLuck.CmdName);
            commands.ChangeLuck.PerMissionMin = ReadWriteByte("Permission", "ChangeLuck", commands.ChangeLuck.PerMissionMin);
            commands.Hunger.CmdName = ReadWriteString("Command", "Hunger", commands.Hunger.CmdName);
            commands.Hunger.PerMissionMin = ReadWriteByte("Permission", "Hunger", commands.Hunger.PerMissionMin);
            commands.Hair.CmdName = ReadWriteString("Command", "Hair", commands.Hair.CmdName);
            commands.Hair.PerMissionMin = ReadWriteByte("Permission", "Hair", commands.Hair.PerMissionMin);
            commands.Training.CmdName = ReadWriteString("Command", "Training", commands.Training.CmdName);
            commands.Training.PerMissionMin = ReadWriteByte("Permission", "Training", commands.Training.PerMissionMin);
            commands.DeleteSkill.CmdName = ReadWriteString("Command", "DeleteSkill", commands.DeleteSkill.CmdName);
            commands.DeleteSkill.PerMissionMin = ReadWriteByte("Permission", "DeleteSkill", commands.DeleteSkill.PerMissionMin);
            commands.ChangeJob.CmdName = ReadWriteString("Command", "ChangeJob", commands.ChangeJob.CmdName);
            commands.ChangeJob.PerMissionMin = ReadWriteByte("Permission", "ChangeJob", commands.ChangeJob.PerMissionMin);
            commands.ChangeGender.CmdName = ReadWriteString("Command", "ChangeGender", commands.ChangeGender.CmdName);
            commands.ChangeGender.PerMissionMin = ReadWriteByte("Permission", "ChangeGender", commands.ChangeGender.PerMissionMin);
            commands.NameColor.CmdName = ReadWriteString("Command", "NameColor", commands.NameColor.CmdName);
            commands.NameColor.PerMissionMin = ReadWriteByte("Permission", "NameColor", commands.NameColor.PerMissionMin);
            commands.Mission.CmdName = ReadWriteString("Command", "Mission", commands.Mission.CmdName);
            commands.Mission.PerMissionMin = ReadWriteByte("Permission", "Mission", commands.Mission.PerMissionMin);
            commands.MobPlace.CmdName = ReadWriteString("Command", "MobPlace", commands.MobPlace.CmdName);
            commands.MobPlace.PerMissionMin = ReadWriteByte("Permission", "MobPlace", commands.MobPlace.PerMissionMin);
            commands.Transparecy.CmdName = ReadWriteString("Command", "Transparecy", commands.Transparecy.CmdName);
            commands.Transparecy.PerMissionMin = ReadWriteByte("Permission", "Transparecy", commands.Transparecy.PerMissionMin);
            commands.DeleteItem.CmdName = ReadWriteString("Command", "DeleteItem", commands.DeleteItem.CmdName);
            commands.DeleteItem.PerMissionMin = ReadWriteByte("Permission", "DeleteItem", commands.DeleteItem.PerMissionMin);
            commands.Level.CmdName = ReadWriteString("Command", "Level0", commands.Level.CmdName);
            commands.Level.PerMissionMin = ReadWriteByte("Permission", "Level0", commands.Level.PerMissionMin);
            commands.ClearMission.CmdName = ReadWriteString("Command", "ClearMission", commands.ClearMission.CmdName);
            commands.ClearMission.PerMissionMin = ReadWriteByte("Permission", "ClearMission", commands.ClearMission.PerMissionMin);
            commands.SetFlag.CmdName = ReadWriteString("Command", "SetFlag", commands.SetFlag.CmdName);
            commands.SetFlag.PerMissionMin = ReadWriteByte("Permission", "SetFlag", commands.SetFlag.PerMissionMin);
            commands.SetOpen.CmdName = ReadWriteString("Command", "SetOpen", commands.SetOpen.CmdName);
            commands.SetOpen.PerMissionMin = ReadWriteByte("Permission", "SetOpen", commands.SetOpen.PerMissionMin);
            commands.SetUnit.CmdName = ReadWriteString("Command", "SetUnit", commands.SetUnit.CmdName);
            commands.SetUnit.PerMissionMin = ReadWriteByte("Permission", "SetUnit", commands.SetUnit.PerMissionMin);
            commands.Reconnection.CmdName = ReadWriteString("Command", "ReConnection", commands.Reconnection.CmdName);
            commands.Reconnection.PerMissionMin = ReadWriteByte("Permission", "ReConnection", commands.Reconnection.PerMissionMin);
            commands.DisableFilter.CmdName = ReadWriteString("Command", "DisableFilter", commands.DisableFilter.CmdName);
            commands.DisableFilter.PerMissionMin = ReadWriteByte("Permission", "DisableFilter", commands.DisableFilter.PerMissionMin);
            commands.ChguserFull.CmdName = ReadWriteString("Command", "ChangeUserFull", commands.ChguserFull.CmdName);
            commands.ChguserFull.PerMissionMin = ReadWriteByte("Permission", "ChangeUserFull", commands.ChguserFull.PerMissionMin);
            commands.ChgZenFastStep.CmdName = ReadWriteString("Command", "ChangeZenFastStep", commands.ChgZenFastStep.CmdName);
            commands.ChgZenFastStep.PerMissionMin = ReadWriteByte("Permission", "ChangeZenFastStep", commands.ChgZenFastStep.PerMissionMin);
            commands.ContestPoint.CmdName = ReadWriteString("Command", "ContestPoint", commands.ContestPoint.CmdName);
            commands.ContestPoint.PerMissionMin = ReadWriteByte("Permission", "ContestPoint", commands.ContestPoint.PerMissionMin);
            commands.StartContest.CmdName = ReadWriteString("Command", "StartContest", commands.StartContest.CmdName);
            commands.StartContest.PerMissionMin = ReadWriteByte("Permission", "StartContest", commands.StartContest.PerMissionMin);
            commands.EndContest.CmdName = ReadWriteString("Command", "EndContest", commands.EndContest.CmdName);
            commands.EndContest.PerMissionMin = ReadWriteByte("Permission", "EndContest", commands.EndContest.PerMissionMin);
            commands.Announcement.CmdName = ReadWriteString("Command", "Announcement", commands.Announcement.CmdName);
            commands.Announcement.PerMissionMin = ReadWriteByte("Permission", "Announcement", commands.Announcement.PerMissionMin);
            commands.Oxquizroom.CmdName = ReadWriteString("Command", "OXQuizRoom", commands.Oxquizroom.CmdName);
            commands.Oxquizroom.PerMissionMin = ReadWriteByte("Permission", "OXQuizRoom", commands.Oxquizroom.PerMissionMin);
            commands.Gsa.CmdName = ReadWriteString("Command", "Gsa", commands.Gsa.CmdName);
            commands.Gsa.PerMissionMin = ReadWriteByte("Permission", "Gsa", commands.Gsa.PerMissionMin);
            commands.ChangeItemName.CmdName = ReadWriteString("Command", "ChangeItemName", commands.ChangeItemName.CmdName);
            commands.ChangeItemName.PerMissionMin = ReadWriteByte("Permission", "ChangeItemName", commands.ChangeItemName.PerMissionMin);
            commands.DisableSendMsg.CmdName = ReadWriteString("Command", "DisableSendMsg", commands.DisableSendMsg.CmdName);
            commands.DisableSendMsg.PerMissionMin = ReadWriteByte("Permission", "DisableSendMsg", commands.DisableSendMsg.PerMissionMin);
            commands.EnableSendMsg.CmdName = ReadWriteString("Command", "EnableSendMsg", commands.EnableSendMsg.CmdName);
            commands.EnableSendMsg.PerMissionMin = ReadWriteByte("Permission", "EnableSendMsg", commands.EnableSendMsg.PerMissionMin);
            commands.DisableSendMsgList.CmdName = ReadWriteString("Command", "DisableSendMsgList", commands.DisableSendMsgList.CmdName);
            commands.DisableSendMsgList.PerMissionMin = ReadWriteByte("Permission", "DisableSendMsgList", commands.DisableSendMsgList.PerMissionMin);
            commands.Kill.CmdName = ReadWriteString("Command", "Kill", commands.Kill.CmdName);
            commands.Kill.PerMissionMin = ReadWriteByte("Permission", "Kill", commands.Kill.PerMissionMin);
            commands.Make.CmdName = ReadWriteString("Command", "Make", commands.Make.CmdName);
            commands.Make.PerMissionMin = ReadWriteByte("Permission", "MakeMin", commands.Make.PerMissionMin);
            commands.Make.PerMissionMax = ReadWriteByte("Permission", "MakeMax", commands.Make.PerMissionMax);
            commands.Smake.CmdName = ReadWriteString("Command", "SuperMake", commands.Smake.CmdName);
            commands.Smake.PerMissionMin = ReadWriteByte("Permission", "SuperMake", commands.Smake.PerMissionMin);
            commands.BonusPoint.CmdName = ReadWriteString("Command", "BonusPoint", commands.BonusPoint.CmdName);
            commands.BonusPoint.PerMissionMin = ReadWriteByte("Permission", "BonusPoint", commands.BonusPoint.PerMissionMin);
            commands.BonusPoint.PerMissionMax = ReadWriteByte("Permission", "BonusPointMax", commands.BonusPoint.PerMissionMax);
            commands.DelBonusPoint.CmdName = ReadWriteString("Command", "DelBonusPoint", commands.DelBonusPoint.CmdName);
            commands.DelBonusPoint.PerMissionMin = ReadWriteByte("Permission", "DelBonusPoint", commands.DelBonusPoint.PerMissionMin);
            commands.Restbonuspoint.CmdName = ReadWriteString("Command", "RestBonusPoint", commands.Restbonuspoint.CmdName);
            commands.Restbonuspoint.PerMissionMin = ReadWriteByte("Permission", "RestBonusPoint", commands.Restbonuspoint.PerMissionMin);
            commands.Restbonuspoint.PerMissionMax = ReadWriteByte("Permission", "RestBonusPointMax", commands.Restbonuspoint.PerMissionMax);
            commands.FireBurn.CmdName = ReadWriteString("Command", "FireBurn", commands.FireBurn.CmdName);
            commands.FireBurn.PerMissionMin = ReadWriteByte("Permission", "FireBurn", commands.FireBurn.PerMissionMin);
            commands.TestStatus.CmdName = ReadWriteString("Command", "TestStatus", commands.TestStatus.CmdName);
            commands.TestStatus.PerMissionMin = ReadWriteByte("Permission", "TestStatus", commands.TestStatus.PerMissionMin);
            commands.DelGold.CmdName = ReadWriteString("Command", "DelGold", commands.DelGold.CmdName);
            commands.DelGold.PerMissionMin = ReadWriteByte("Permission", "DelGold", commands.DelGold.PerMissionMin);
            commands.AddGold.CmdName = ReadWriteString("Command", "AddGold", commands.AddGold.CmdName);
            commands.AddGold.PerMissionMin = ReadWriteByte("Permission", "AddGold", commands.AddGold.PerMissionMin);
            commands.DelGameGold.CmdName = ReadWriteString("Command", "DelGameGold", commands.DelGameGold.CmdName);
            commands.DelGameGold.PerMissionMin = ReadWriteByte("Permission", "DelGameGold", commands.DelGameGold.PerMissionMin);
            commands.AddGameGold.CmdName = ReadWriteString("Command", "AddGamePoint", commands.AddGameGold.CmdName);
            commands.AddGameGold.PerMissionMin = ReadWriteByte("Permission", "AddGamePoint", commands.AddGameGold.PerMissionMin);
            commands.GameGold.CmdName = ReadWriteString("Command", "GameGold", commands.GameGold.CmdName);
            commands.GameGold.PerMissionMin = ReadWriteByte("Permission", "GameGold", commands.GameGold.PerMissionMin);
            commands.GamePoint.CmdName = ReadWriteString("Command", "GamePoint", commands.GamePoint.CmdName);
            commands.GamePoint.PerMissionMin = ReadWriteByte("Permission", "GamePoint", commands.GamePoint.PerMissionMin);
            commands.CreditPoint.CmdName = ReadWriteString("Command", "CreditPoint", commands.CreditPoint.CmdName);
            commands.CreditPoint.PerMissionMin = ReadWriteByte("Permission", "CreditPoint", commands.CreditPoint.PerMissionMin);
            commands.Testgoldchange.CmdName = ReadWriteString("Command", "TestGoldChange", commands.Testgoldchange.CmdName);
            commands.Testgoldchange.PerMissionMin = ReadWriteByte("Permission", "TestGoldChange", commands.Testgoldchange.PerMissionMin);
            commands.RefineWeapon.CmdName = ReadWriteString("Command", "RefineWeapon", commands.RefineWeapon.CmdName);
            commands.RefineWeapon.PerMissionMin = ReadWriteByte("Permission", "RefineWeapon", commands.RefineWeapon.PerMissionMin);
            commands.ReloadAdmin.CmdName = ReadWriteString("Command", "ReloadAdmin", commands.ReloadAdmin.CmdName);
            commands.ReloadAdmin.PerMissionMin = ReadWriteByte("Permission", "ReloadAdmin", commands.ReloadAdmin.PerMissionMin);
            commands.ReloadNpc.CmdName = ReadWriteString("Command", "ReloadNpc", commands.ReloadNpc.CmdName);
            commands.ReloadNpc.PerMissionMin = ReadWriteByte("Permission", "ReloadNpc", commands.ReloadNpc.PerMissionMin);
            commands.ReloadManage.CmdName = ReadWriteString("Command", "ReloadManage", commands.ReloadManage.CmdName);
            commands.ReloadManage.PerMissionMin = ReadWriteByte("Permission", "ReloadManage", commands.ReloadManage.PerMissionMin);
            commands.ReloadRobotManage.CmdName = ReadWriteString("Command", "ReloadRobotManage", commands.ReloadRobotManage.CmdName);
            commands.ReloadRobotManage.PerMissionMin = ReadWriteByte("Permission", "ReloadRobotManage", commands.ReloadRobotManage.PerMissionMin);
            commands.ReloadRobot.CmdName = ReadWriteString("Command", "ReloadRobot", commands.ReloadRobot.CmdName);
            commands.ReloadRobot.PerMissionMin = ReadWriteByte("Permission", "ReloadRobot", commands.ReloadRobot.PerMissionMin);
            commands.ReloadMonItems.CmdName = ReadWriteString("Command", "ReloadMonitems", commands.ReloadMonItems.CmdName);
            commands.ReloadMonItems.PerMissionMin = ReadWriteByte("Permission", "ReloadMonitems", commands.ReloadMonItems.PerMissionMin);
            commands.Reloaddiary.CmdName = ReadWriteString("Command", "ReloadDiary", commands.Reloaddiary.CmdName);
            commands.Reloaddiary.PerMissionMin = ReadWriteByte("Permission", "ReloadDiary", commands.Reloaddiary.PerMissionMin);
            commands.ReloadItemDB.CmdName = ReadWriteString("Command", "ReloadItemDB", commands.ReloadItemDB.CmdName);
            commands.ReloadItemDB.PerMissionMin = ReadWriteByte("Permission", "ReloadItemDB", commands.ReloadItemDB.PerMissionMin);
            commands.ReloadMagicDb.CmdName = ReadWriteString("Command", "ReloadMagicDB", commands.ReloadMagicDb.CmdName);
            commands.ReloadMagicDb.PerMissionMin = ReadWriteByte("Permission", "ReloadMagicDB", commands.ReloadMagicDb.PerMissionMin);
            commands.Reloadmonsterdb.CmdName = ReadWriteString("Command", "ReloadMonsterDB", commands.Reloadmonsterdb.CmdName);
            commands.Reloadmonsterdb.PerMissionMin = ReadWriteByte("Permission", "ReloadMonsterDB", commands.Reloadmonsterdb.PerMissionMin);
            commands.ReaLive.CmdName = ReadWriteString("Command", "ReAlive", commands.ReaLive.CmdName);
            commands.ReaLive.PerMissionMin = ReadWriteByte("Permission", "ReAlive", commands.ReaLive.PerMissionMin);
            commands.AdjuestLevel.CmdName = ReadWriteString("Command", "AdjuestTLevel", commands.AdjuestLevel.CmdName);
            commands.AdjuestLevel.PerMissionMin = ReadWriteByte("Permission", "AdjuestTLevel", commands.AdjuestLevel.PerMissionMin);
            commands.AdjuestExp.CmdName = ReadWriteString("Command", "AdjuestExp", commands.AdjuestExp.CmdName);
            commands.AdjuestExp.PerMissionMin = ReadWriteByte("Permission", "AdjuestExp", commands.AdjuestExp.PerMissionMin);
            commands.AddGuild.CmdName = ReadWriteString("Command", "AddGuild", commands.AddGuild.CmdName);
            commands.AddGuild.PerMissionMin = ReadWriteByte("Permission", "AddGuild", commands.AddGuild.PerMissionMin);
            commands.DelGuild.CmdName = ReadWriteString("Command", "DelGuild", commands.DelGuild.CmdName);
            commands.DelGuild.PerMissionMin = ReadWriteByte("Permission", "DelGuild", commands.DelGuild.PerMissionMin);
            commands.ChangeSabukLord.CmdName = ReadWriteString("Command", "ChangeSabukLord", commands.ChangeSabukLord.CmdName);
            commands.ChangeSabukLord.PerMissionMin = ReadWriteByte("Permission", "ChangeSabukLord", commands.ChangeSabukLord.PerMissionMin);
            commands.ForcedWallConQuestWar.CmdName = ReadWriteString("Command", "ForcedWallConQuestWar", commands.ForcedWallConQuestWar.CmdName);
            commands.ForcedWallConQuestWar.PerMissionMin = ReadWriteByte("Permission", "ForcedWallConQuestWar", commands.ForcedWallConQuestWar.PerMissionMin);
            commands.Addtoitemevent.CmdName = ReadWriteString("Command", "AddToItemEvent", commands.Addtoitemevent.CmdName);
            commands.Addtoitemevent.PerMissionMin = ReadWriteByte("Permission", "AddToItemEvent", commands.Addtoitemevent.PerMissionMin);
            commands.Addtoitemeventaspieces.CmdName = ReadWriteString("Command", "AddToItemEventAspieces", commands.Addtoitemeventaspieces.CmdName);
            commands.Addtoitemeventaspieces.PerMissionMin = ReadWriteByte("Permission", "AddToItemEventAspieces", commands.Addtoitemeventaspieces.PerMissionMin);
            commands.ItemEventList.CmdName = ReadWriteString("Command", "ItemEventList", commands.ItemEventList.CmdName);
            commands.ItemEventList.PerMissionMin = ReadWriteByte("Permission", "ItemEventList", commands.ItemEventList.PerMissionMin);
            commands.Startinggiftno.CmdName = ReadWriteString("Command", "StartIngGiftNO", commands.Startinggiftno.CmdName);
            commands.Startinggiftno.PerMissionMin = ReadWriteByte("Permission", "StartIngGiftNO", commands.Startinggiftno.PerMissionMin);
            commands.Deleteallitemevent.CmdName = ReadWriteString("Command", "DeleteAllItemEvent", commands.Deleteallitemevent.CmdName);
            commands.Deleteallitemevent.PerMissionMin = ReadWriteByte("Permission", "DeleteAllItemEvent", commands.Deleteallitemevent.PerMissionMin);
            commands.Startitemevent.CmdName = ReadWriteString("Command", "StartItemEvent", commands.Startitemevent.CmdName);
            commands.Startitemevent.PerMissionMin = ReadWriteByte("Permission", "StartItemEvent", commands.Startitemevent.PerMissionMin);
            commands.Itemeventterm.CmdName = ReadWriteString("Command", "ItemEventTerm", commands.Itemeventterm.CmdName);
            commands.Itemeventterm.PerMissionMin = ReadWriteByte("Permission", "ItemEventTerm", commands.Itemeventterm.PerMissionMin);
            commands.Adjuesttestlevel.CmdName = ReadWriteString("Command", "AdjuestTestLevel", commands.Adjuesttestlevel.CmdName);
            commands.Adjuesttestlevel.PerMissionMin = ReadWriteByte("Permission", "AdjuestTestLevel", commands.Adjuesttestlevel.PerMissionMin);
            commands.TrainingSkill.CmdName = ReadWriteString("Command", "OpTraining", commands.TrainingSkill.CmdName);
            commands.TrainingSkill.PerMissionMin = ReadWriteByte("Permission", "OpTraining", commands.TrainingSkill.PerMissionMin);
            commands.Opdeleteskill.CmdName = ReadWriteString("Command", "OpDeleteSkill", commands.Opdeleteskill.CmdName);
            commands.Opdeleteskill.PerMissionMin = ReadWriteByte("Permission", "OpDeleteSkill", commands.Opdeleteskill.PerMissionMin);
            commands.Changeweapondura.CmdName = ReadWriteString("Command", "ChangeWeaponDura", commands.Changeweapondura.CmdName);
            commands.Changeweapondura.PerMissionMin = ReadWriteByte("Permission", "ChangeWeaponDura", commands.Changeweapondura.PerMissionMin);
            commands.ReloadGuildAll.CmdName = ReadWriteString("Command", "ReloadGuildAll", commands.ReloadGuildAll.CmdName);
            commands.ReloadGuildAll.PerMissionMin = ReadWriteByte("Permission", "ReloadGuildAll", commands.ReloadGuildAll.PerMissionMin);
            commands.Who.CmdName = ReadWriteString("Command", "Who", commands.Who.CmdName);
            commands.Who.PerMissionMin = ReadWriteByte("Permission", "Who", commands.Who.PerMissionMin);
            commands.Total.CmdName = ReadWriteString("Command", "Total", commands.Total.CmdName);
            commands.Total.PerMissionMin = ReadWriteByte("Permission", "Total", commands.Total.PerMissionMin);
            commands.Testga.CmdName = ReadWriteString("Command", "TestGa", commands.Testga.CmdName);
            commands.Testga.PerMissionMin = ReadWriteByte("Permission", "TestGa", commands.Testga.PerMissionMin);
            commands.MapInfo.CmdName = ReadWriteString("Command", "MapInfo", commands.MapInfo.CmdName);
            commands.MapInfo.PerMissionMin = ReadWriteByte("Permission", "MapInfo", commands.MapInfo.PerMissionMin);
            commands.SbkDoor.CmdName = ReadWriteString("Command", "SbkDoor", commands.SbkDoor.CmdName);
            commands.SbkDoor.PerMissionMin = ReadWriteByte("Permission", "SbkDoor", commands.SbkDoor.PerMissionMin);
            commands.ChangeDearName.CmdName = ReadWriteString("Command", "ChangeDearName", commands.ChangeDearName.CmdName);
            commands.ChangeDearName.PerMissionMin = ReadWriteByte("Permission", "ChangeDearName", commands.ChangeDearName.PerMissionMin);
            commands.ChangeMasterName.CmdName = ReadWriteString("Command", "ChangeMasterName", commands.ChangeMasterName.CmdName);
            commands.ChangeMasterName.PerMissionMin = ReadWriteByte("Permission", "ChangeMasterName", commands.ChangeMasterName.PerMissionMin);
            commands.StartQuest.CmdName = ReadWriteString("Command", "StartQuest", commands.StartQuest.CmdName);
            commands.StartQuest.PerMissionMin = ReadWriteByte("Permission", "StartQuest", commands.StartQuest.PerMissionMin);
            commands.SetperMission.CmdName = ReadWriteString("Command", "SetPermission", commands.SetperMission.CmdName);
            commands.SetperMission.PerMissionMin = ReadWriteByte("Permission", "SetPermission", commands.SetperMission.PerMissionMin);
            commands.ClearMon.CmdName = ReadWriteString("Command", "ClearMon", commands.ClearMon.CmdName);
            commands.ClearMon.PerMissionMin = ReadWriteByte("Permission", "ClearMon", commands.ClearMon.PerMissionMin);
            commands.RenewLevel.CmdName = ReadWriteString("Command", "ReNewLevel", commands.RenewLevel.CmdName);
            commands.RenewLevel.PerMissionMin = ReadWriteByte("Permission", "ReNewLevel", commands.RenewLevel.PerMissionMin);
            commands.DenyipLogon.CmdName = ReadWriteString("Command", "DenyIPaddrLogon", commands.DenyipLogon.CmdName);
            commands.DenyipLogon.PerMissionMin = ReadWriteByte("Permission", "DenyIPaddrLogon", commands.DenyipLogon.PerMissionMin);
            commands.DenyAccountLogon.CmdName = ReadWriteString("Command", "DenyAccountLogon", commands.DenyAccountLogon.CmdName);
            commands.DenyAccountLogon.PerMissionMin = ReadWriteByte("Permission", "DenyAccountLogon", commands.DenyAccountLogon.PerMissionMin);
            commands.DenyChrNameLogon.CmdName = ReadWriteString("Command", "DenyChrNameLogon", commands.DenyChrNameLogon.CmdName);
            commands.DenyChrNameLogon.PerMissionMin = ReadWriteByte("Permission", "DenyChrNameLogon", commands.DenyChrNameLogon.PerMissionMin);
            commands.DelDenyIpLogon.CmdName = ReadWriteString("Command", "DelDenyIPLogon", commands.DelDenyIpLogon.CmdName);
            commands.DelDenyIpLogon.PerMissionMin = ReadWriteByte("Permission", "DelDenyIPLogon", commands.DelDenyIpLogon.PerMissionMin);
            commands.DelDenyAccountLogon.CmdName = ReadWriteString("Command", "DelDenyAccountLogon", commands.DelDenyAccountLogon.CmdName);
            commands.DelDenyAccountLogon.PerMissionMin = ReadWriteByte("Permission", "DelDenyAccountLogon", commands.DelDenyAccountLogon.PerMissionMin);
            commands.DelDenyChrNameLogon.CmdName = ReadWriteString("Command", "DelDenyChrNameLogon", commands.DelDenyChrNameLogon.CmdName);
            commands.DelDenyChrNameLogon.PerMissionMin = ReadWriteByte("Permission", "DelDenyChrNameLogon", commands.DelDenyChrNameLogon.PerMissionMin);
            commands.ShowDenyIpLogon.CmdName = ReadWriteString("Command", "ShowDenyIPLogon", commands.ShowDenyIpLogon.CmdName);
            commands.ShowDenyIpLogon.PerMissionMin = ReadWriteByte("Permission", "ShowDenyIPLogon", commands.ShowDenyIpLogon.PerMissionMin);
            commands.ShowDenyAccountLogon.CmdName = ReadWriteString("Command", "ShowDenyAccountLogon", commands.ShowDenyAccountLogon.CmdName);
            commands.ShowDenyAccountLogon.PerMissionMin = ReadWriteByte("Permission", "ShowDenyAccountLogon", commands.ShowDenyAccountLogon.PerMissionMin);
            commands.ShowDenyChrNameLogon.CmdName = ReadWriteString("Command", "ShowDenyChrNameLogon", commands.ShowDenyChrNameLogon.CmdName);
            commands.ShowDenyChrNameLogon.PerMissionMin = ReadWriteByte("Permission", "ShowDenyChrNameLogon", commands.ShowDenyChrNameLogon.PerMissionMin);
            commands.ViewWhisper.CmdName = ReadWriteString("Command", "ViewWhisper", commands.ViewWhisper.CmdName);
            commands.ViewWhisper.PerMissionMin = ReadWriteByte("Permission", "ViewWhisper", commands.ViewWhisper.PerMissionMin);
            commands.Spirit.CmdName = ReadWriteString("Command", "SpiritStart", commands.Spirit.CmdName);
            commands.Spirit.PerMissionMin = ReadWriteByte("Permission", "SpiritStart", commands.Spirit.PerMissionMin);
            commands.SpiritStop.CmdName = ReadWriteString("Command", "SpiritStop", commands.SpiritStop.CmdName);
            commands.SpiritStop.PerMissionMin = ReadWriteByte("Permission", "SpiritStop", commands.SpiritStop.PerMissionMin);
            commands.SetMapMode.CmdName = ReadWriteString("Command", "SetMapMode", commands.SetMapMode.CmdName);
            commands.SetMapMode.PerMissionMin = ReadWriteByte("Permission", "SetMapMode", commands.SetMapMode.PerMissionMin);
            commands.ShowMapMode.CmdName = ReadWriteString("Command", "ShoweMapMode", commands.ShowMapMode.CmdName);
            commands.ShowMapMode.PerMissionMin = ReadWriteByte("Permission", "ShoweMapMode", commands.ShowMapMode.PerMissionMin);
            commands.ClearBag.CmdName = ReadWriteString("Command", "ClearBag", commands.ClearBag.CmdName);
            commands.ClearBag.PerMissionMin = ReadWriteByte("Permission", "ClearBag", commands.ClearBag.PerMissionMin);
            commands.LockLogon.CmdName = ReadWriteString("Command", "LockLogin", commands.LockLogon.CmdName);
            commands.LockLogon.PerMissionMin = ReadWriteByte("Permission", "LockLogin", commands.LockLogon.PerMissionMin);
            SystemShare.GMRedMsgCmd = Convert.ToChar(ReadWriteString("Command", "GMRedMsgCmd", SystemShare.GMRedMsgCmd.ToString()));
            SystemShare.GMREDMSGCMD = ReadWriteByte("Permission", "GMRedMsgCmd", SystemShare.GMREDMSGCMD);
        }
    }
}